package com.xzy.learn.spring.lookup.config;

import com.xzy.learn.spring.entity.User;
import org.springframework.context.annotation.Bean;

/**
 * @author xzy.xiao
 * @date 2022/6/6  15:57
 */
public class ParentBeanFactoryConfig {
    @Bean
    public User user1() {
        System.out.println("create user1 defined in parent bean factory");
        return new User(1001L, "use1 defined in parent bean factory");
    }

    @Bean
    public User user4() {
        System.out.println("create user4 defined in parent bean factory");
        return new User(1004L, "use1 defined in parent bean factory");
    }
}
